/*
 * @Author: hrg
 * @Date: 2024-02-01 11:00:04
 * @LastEditTime: 2024-02-01 14:29:00
 * @FilePath: \study_go\study09_gin\gin_dome_04\mian..go
 * @Description:设置服务
 */
package main

import (
	"fmt"
	"model/study09_gin/gin_dome_04/system"
	"time"
)

func main() {
	// 取结构体地址进行实例化操作
	var server = &fuwu{}

	server.Start()

	time.Sleep(10 * time.Second)

	server.Stop()

}

type fuwu struct{}

func (f *fuwu) Start() {
	fmt.Println("开启服务成功")
	f.run()
}

func (f *fuwu) Stop() {
	fmt.Println("服务停止")
}

func (f *fuwu) run() {
	system.Init()
}
